<?php
include("controllers/read.php");
$db = openDB("database.sqlite");
$config = getConfig();
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" href="skins/default/stylesheet.css" />
    <title>Install Pete_Wiki</title>  
  </head>
  
  <body>
  	<table width="100%">
  	  <tr>
  	    <td id="header" colspan="2">Install Pete_Wiki</td>
  	  </tr>
  	  <tr>
  	    <td>
  	      <div id="main_content">
  	        <p>Welcome to PeteWiki <?php echo $config['version'] ?>!</p>
            <p>put in a little information about your wiki and you can get started:</p>
            <style type="text/css" media="screen">
              input.config {width: 400px;}
            </style>
            <form action="controllers/write.php" method="post">
            	<p>URL: (don't forget a slash at the end)
            	<input class="config" type="text" name="config_url" value="<?php echo $config['url'] ?>" /></p>
            	<p>name:
            	<input class="config" type="text" name="config_name" value="<?php echo $config['name'] ?>" /></p>
            	<p>tagline:
            	<input class="config" type="text" name="config_tagline" value="<?php echo $config['tagline'] ?>" /></p>
            	<p>skin
            	<input class="config" type="text" name="config_skin" value="<?php echo $config['skin'] ?>" /></p>
            	<p><input type="checkbox" name="config_mod_rewrite" <?php if($config['mod_rewrite_enabled']=='true'){echo "checked='checked'";} ?> /> mod_rewrite enabled (for pretty links)</p>
            	<input type="submit" value="Save Options &raquo;" accesskey="s" />
            </form>
  	      </div>
  	    </td>
  	    <td id="sidebar">
  	    </td>
  	  </tr>
  	  <tr>
  	   <td id="footer" colspan="2">
  	     proudly powered by <strong><a href="http://purl.oclc.org/NET/thinking-chair/aboutpetewiki" title="Version <?php echo $pete_wiki['version'] ?>">pete_wiki</a></strong> (hey yeah)
  	   </td>
  	  </tr>
  	</table>
  </body>
</html>